#include "ConditionSimple.h"
#include <cassert>

ConditionSimple::ConditionSimple(const Node* _node, bool _bIsNot)
: m_node(_node), m_isNot(_bIsNot)
{
}

ConditionSimple::~ConditionSimple(void)
{}

void	ConditionSimple::AddSimpleCondition	(const ICondition* condition)
{
	assert(!"ConditionSimple::AddSimpleCondition should not be called");
}

void	ConditionSimple::AddSubCondition		(const ICondition* condition)
{
	assert(!"ConditionSimple::AddSubCondition should not be called");
}

bool	ConditionSimple::GetBoolean(void) const
{
	return this->m_isNot ? !this->m_node->GetBoolean() : this->m_node->GetBoolean();
}

bool	ConditionSimple::ContainsNode(char nodeId) const
{
	return this->m_node->GetId() == nodeId;
}